package com.atguigu.gmall.weball.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author A
 * @version 1.0
 * @description: TODO
 * @date 2025/9/8 21:37
 */
@Controller
public class UserController {
    //?originUrl=http://gmall.com/
    @GetMapping("/login.html")
    public String login(@RequestParam(value = "originUrl", required = false) String originUrl, Model model) {
        model.addAttribute("originUrl", originUrl);
        return "login";
    }


    @GetMapping("/register.html")
    public String register() {
        return "user/register";
    }

    @GetMapping("/address.html")
    public String address() {
        return "user/address";
    }
}
